package com.cloud.mkz.common.api.feign.factory;

import com.cloud.mkz.common.api.feign.ParamClient;
import com.cloud.mkz.common.api.feign.fallback.ParamServiceFallback;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * ClassName: ParamServiceFallbackFactory 
 * @Description: 系统参数
 * @author: KuangJianyu
 * @date: 2020年4月18日
 */
@Component
public class ParamServiceFallbackFactory implements FallbackFactory<ParamClient> {

	@Override
	public ParamClient create(Throwable throwable) {
		ParamServiceFallback paramServiceFallback = new ParamServiceFallback();
		paramServiceFallback.setCause(throwable);
		return paramServiceFallback;
	}
}
